package com.msmall.community.wish.service;

import java.io.File;
import java.util.List;

import com.msmall.base.pager.PaginationSupport;
import com.msmall.base.service.BaseManager;
import com.msmall.community.wish.model.Wish;
import com.msmall.community.wish.model.WishReply;
import com.msmall.community.wish.model.WishType;

public interface WishManager extends BaseManager{

	public WishType saveWishType(WishType type, String uat, File bg, String bgFileName, File common, String commonFileName, File active, String activeFileName);
	
	/**
	 * 获得第一个心愿类型，通过ID 升序
	 */
	public WishType getTheFirstWishType();
	
	/**
	 * 用户许愿
	 */
	public Wish makeWish(Long userid, String content, Short reply, Long typeid);
	
	/**
	 * userid给wishid回复
	 */
	public WishReply saveWishReply(Long userid, Long wishid, String content);
	/**
	 * 删除回复
	 */
	public WishReply removeWishReply(Long userid, Long replyid);
	/**
	 * 获得所有心愿类型
	 */
	public void getWishTypes(PaginationSupport page);
	
	/**
	 * 获得心愿类型<br/>
	 * enabled = ConstantDB.AVALIABLE / ConstantDB.UNAVALIBLE<br/>
	 * enabled == null 取全部
	 */
	public List<WishType> getWishTypes(Short enabled);
	
	/**
	 * 通过WISHID获得回复，分页;页码：pageIndex，页大小：pageSize
	 */
	public List<WishReply> getWishReplies(Long wishid, int pageIndex, int pageSize);
	/**
	 * 通过类型获得类型下的心愿
	 */
	public void getWishes(PaginationSupport page, Long typeid);
	
	/**
	 * 通过类型获得类型下的心愿,排除wishid
	 */
	public void getWishes(PaginationSupport page, Long typeid, Long wishid);
}
